Chris Pollett > Old Classes >
CS185c

( Print View )

Grades: [Sec2]

Submit: [Sec2]

Course Info:
  [Texts & Links]
  [Topics]
  [Grading]
  [HW Info]
  [Exam Info]
  [Regrades]
  [Honesty]
  [Announcements]

HW Assignments:
  [Hw1]  [Hw2]  [Hw3]
  [Hw4]  [Hw5]

Practice Exams:
  [Mid1]  [Mid2]  [Final]

                            












CS185c Fall 2002Practice Midterm 1

The practice midterm is below. Here are some facts about the actual midterm: (a) The midterm will be in class . (b) It is closed book, closed notes. Nothing will be permitted on your desk except your pen (pencil) and test. (c) You should bring photo ID. (d) There will be more than one version of the test. Each version will be of comparable difficulty. (e) If your cell-phone or beeper goes off you will be excused from the test at that point and graded on what you have done till your excusal. (f) One problem (less typos) on the actual test will be from the practice test.

 1. Give the three modes of operation that the Palm OS supports. 
Briefly, explain the purpose of each of these modes.

2 Explain what the following components of Dynamic RAM in the Palm OS 
are used for: System Global Variables and the Application Stack.

3. In relation to memory on a Palm what is a card? How many bit 
architecture is the Palm device? Explain the term chunk in relation to 
the dynamic heap on the Palm.

4. Write a Makefile with the following goals (you may add subgoals).
   (a) all - compile bob.c and bob.rcp into a working .prc file.
   (b) clean - deletes everything created by a make all, 
               leaves intact our .h, .c, and .rcp files. 

5. Given a FormPtr bob, give the code needed to make the function 
HandleBobEvents the callback function for the form pointed to by bob.
How do callback functions work? i.e., where might they be called in the
event loop?

6. Explain with code how to get the contents of text field with ID 
NameField from the active form.

7. What is a memory handle? How many locks does the Palm OS permit on a 
memory handle? Give the Palm OS functions to call for allocating and 
deallocating memory.

8. Explain how to compile your code so it can be used with the gdb 
debugger can be used with POSE. Then explain the steps needed to 
start a gdb-pose session. Explain what the following gdb commands do: 

break myprog.c:50;
next
continue

9. Give the pilrc code needed to create an informational about alert 
resource  with title "About Chris", with message "Chris rules" and 
with a button saying "I agree".

10. Give the pilrc code needed to create a form with three buttons: 
"New", "Details", "Delete" which appear at the bottom of the screen
left-aligned one after the other.